from typing import Any, Optional
from pydantic import BaseModel

class Response(BaseModel):
    code: int
    data: Optional[Any] = None
    message: Optional[str] = None

def resp_200(*, data: Any = None, message: str = "Success") -> Response:
    return Response(
        code=10000,
        data=data,
        message=message
    )

def resp_400(*, data: Any = None, message: str = "Bad Request") -> Response:
    return Response(
        code=40000,
        data=data,
        message=message
    )

def resp_4001(*, data: Any = None, message: str = "Unauthorized") -> Response:
    return Response(
        code=40001,
        data=data,
        message=message
    )

def resp_403(*, data: Any = None, message: str = "Forbidden") -> Response:
    return Response(
        code=40003,
        data=data,
        message=message
    )

def resp_404(*, data: Any = None, message: str = "Not Found") -> Response:
    return Response(
        code=40004,
        data=data,
        message=message
    )

def resp_500(*, data: Any = None, message: str = "Internal Error") -> Response:
    return Response(
        code=50000,
        data=data,
        message=message
    ) 